package com.qfoud.edu.aunt.commons.service;

import com.qfoud.edu.aunt.commons.pojo.User;

import java.sql.SQLException;
import java.util.List;

/**
 * @author xiaobobo
 * @title: IUserService
 * @projectName cd-java-2303-project-parent
 * @description: TODO
 * @date 2023/5/11  9:08
 */
public interface IUserService {

    /**
     * 这里就是查询所有数据
     * @return
     * @throws Exception
     */
    List<User> findUserAll()throws Exception;

    /**
     * 通过id删除数据
     * @param id
     */
    void deleteById(Integer id)throws Exception;

    /**
     * 通过id查询用户对象
     * @param id
     * @return
     */
    User findUserById(Integer id) throws Exception;

    /**
     * 通过id更新用户信息
     * @param user
     */
    void updateById(User user)throws Exception;

    /**
     * 添加用户
     * @param user
     */
    void add(User user) throws Exception;
}
